package com.xm.service;

import com.xm.dao.commentsDao;
import com.xm.pojo.comments;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class commentsServiceImpl implements commentsService{
//
    @Autowired
    private commentsDao commentsDao;


    @Override
    public List<comments> commentsInfo(int productId) {
        return commentsDao.commentsInfo(productId);
    }

    @Override
    public boolean addComment(comments comments) {
        return commentsDao.addComment(comments);
    }

    @Override
    public List<comments> userComments(int userId) {
        return commentsDao.userComments(userId);
    }

    @Override
    public boolean delComment(int id) {
        return commentsDao.delComment(id);
    }

    @Override
    public boolean delCommentAll(int userId) {
        return commentsDao.delCommentAll(userId);
    }


}
